feat(provider/vllm_rerank): add configurable rerank_api_suffix option#7278
Conversation
Add rerank_api_suffix config option to the VLLM Rerank provider so users can control the API URL path suffix instead of having /v1/rerank hardcoded. - Default value is /v1/rerank (preserves existing behavior) - Users can set it to empty string to disable auto-append - Handles suffix without leading slash by auto-adding one - Schema, default config, and i18n metadata all updated Issue: Fixes AstrBotDevs#7238
There was a problem hiding this comment.
Code Review
This pull request introduces a configurable rerank_api_suffix for the vLLM rerank provider, allowing users to customize the API endpoint path which was previously hardcoded to /v1/rerank. The changes span configuration defaults, the provider's URL construction logic, and localization files. Review feedback highlights a potential NoneType error when the suffix is explicitly null in the configuration and suggests more generic UI hints for the base URL, as those hints are shared across multiple providers that may not yet support the new suffix field.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40d2b88413
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ptions - Add explicit None check for rerank_api_suffix (fixes HIGH from Gemini) - Update rerank_api_base hint to describe actual behavior without mentioning specific provider options (fixes 3x MEDIUM from Gemini) - Add ru-RU i18n for rerank_api_suffix (fixes P2 from Codex) Co-authored-by: gemini-code-assist[bot] Co-authored-by: chatgpt-codex-connector[bot]
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3575064ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Add
rerank_api_suffixconfig option to the VLLM Rerank provider so users can control the API URL path suffix instead of having/v1/rerankhardcoded.Changes:
vllm_rerank_source.py: Addrerank_api_suffixconfig with leading-slash normalizationdefault.py: Addrerank_api_suffixto vLLM Rerank config template and schemaconfig-metadata.json(zh-CN/en-US): Update i18n hintsBehaviour:
/v1/rerank— preserves existing behaviour for existing configs/by auto-adding oneIssue
Fixes #7238
Test Plan
Summary by Sourcery
Make the vLLM rerank provider’s API endpoint path configurable instead of hardcoding the /v1/rerank suffix.
New Features:
Enhancements:
Documentation: